#ifndef __UM_EPOLL_TOOLS_H__
#define __UM_EPOLL_TOOLS_H__

#include "um_basic_types.h"
#include "umapi_os.h"
#include "umapi_libc.h"
#include "umapi_os_list.h"
#include "umapi_socket.h"
#include <sys/epoll.h>
#include "umUfd.h"

#define GLOBALEPOLL 1


UM_VOID *createEpoll(UM_S32 max);
UM_S32 startEpoll(UM_VOID * poll, UMAPI_SOCKET_ADDR *ipaddr,
	UM_S32 (*conntect)(UM_HANDLE fd, UM_VOID* param
		,UM_EFD **pefd
	),
	UM_S32 (*read)(UM_HANDLE fd, UM_VOID* param),
	UM_S32 (*disconnect)(UM_HANDLE fd, UM_VOID* param),
	UM_VOID *param 
	,UM_HANDLE *fd
	);
UM_VOID removeFd(UM_VOID * poll, UM_VOID *ptr);
UM_VOID listenWriteEvent(UM_VOID *ptr);	
#endif